package com.wfms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.cloud.stream.messaging.Source;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;

/**
 * Created by Administrator on 2018/1/2.
 */
@EnableBinding({Sink.class, Source.class})
public class InputService {

    @StreamListener(Sink.INPUT)
    public void input(Message<String> message){
        System.out.println("收到的消息为"+message.getPayload());
    }

}
